package com.kerbores.blog.service.impl;

import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;

import com.kerbores.blog.bean.Catalog;
import com.kerbores.blog.dao.ICatalogDao;
import com.kerbores.blog.service.ICatalogService;

/**
 * @author 贵源 <br>
 *         create at 2014年10月22日
 */
@IocBean(name = "catalogService")
public class CatalogServiceImpl implements ICatalogService {
	@Inject
	private ICatalogDao catalogDao;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.kerbores.blog.service.ICatalogService#get(int)
	 */
	@Override
	public Catalog get(int id) {
		return catalogDao.findById(id);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.kerbores.blog.service.ICatalogService#save(com.kerbores.blog.bean
	 * .Catalog)
	 */
	@Override
	public boolean save(Catalog catalog) {
		return catalogDao.save(catalog) != null;
	}

}
